package com.lanyun.serviceimpl;

import com.lanyun.dao.ProductTypeDao;
import com.lanyun.pojo.ProductType;
import com.lanyun.service.ProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductTypeServiceImpl implements ProductTypeService {
    @Autowired
    private ProductTypeDao productTypeDao;

    //查询所有商品类型
    @Override
    public List<ProductType> getAll() {
        return productTypeDao.getAll();
    }

    //查询所有商品类型包括仓库
    @Override
    public List<ProductType> allWarehous() {
        return productTypeDao.allWarehous();
    }

    //增加商品类型
    @Override
    public Integer add_type(ProductType productType) {
        return productTypeDao.add_type(productType);
    }

    //数据回显
    @Override
    public ProductType updeat_huixian_type(Integer id) {
        return productTypeDao.updeat_huixian_type(id);
    }
    //修改商品类型
    @Override
    public Integer update_type(ProductType productType) {
        return productTypeDao.update_type(productType);
    }
    //单项删除
    @Override
    public Integer delete_type(Integer id) {
        return productTypeDao.delete_type(id);
    }
    //批量删除
    @Override
    public Integer deleteType(List<Integer> list) {
        return productTypeDao.deleteType(list);
    }


}
